<?php
  include("include/conn.php");
  require('include/Smarty/libs/Smarty.class.php');

  $msg = "";

  if(isset($_POST['submit']) && $_POST['bullionPartyName'] == '')
  {
   $msg = "<center><div class='clean-gray'>Enter Bullion Party Name ...!!!</div></center><br/>";
  }
  if(isset($_POST['bullionPartyName']) && $_POST['bullionPartyName'] != '')
  {
    $insertQuerybullionPartyName = "insert into bullionparty (bullionPartyName) values ('".$_POST['bullionPartyName']."')";
    $insertQuerybullionPartyNameResult = mysql_query($insertQuerybullionPartyName);
    if(!$insertQuerybullionPartyNameResult)
    {
      die("Insert Query Not Inserted : ".mysql_error());
    }
	  else
	  {
	    header("Location:bullionPartyList.php");
	  }
  }
  $smarty = new Smarty;
  require('bottom.php');
  $smarty->assign("l_addParty",$l_addParty);
  $smarty->assign("l_bullionPartyName",$l_bullionPartyName);

  $smarty->assign("msg",$msg);
  $smarty->display('addBullionParty.tpl');
?>